import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import Home from '../views/Home.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import(/* webpackChunkName: "Login" */ '../views/login/index.vue')
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import(/* webpackChunkName: "search" */ '../views/search/index.vue')
  },
  {
    path: '/shoppingCar',
    name: 'ShoppingCar',
    component: () => import(/* webpackChunkName: "ShoppingCar" */ '../views/shoppingCar/index.vue')
  },
  {
    path: '/my',
    name: 'My',
    component: () => import(/* webpackChunkName: "My" */ '../views/my/index.vue')
  },
  {
    path: '/goodsDetails',
    name: 'GoodsDetails',
    component: () => import(/* webpackChunkName: "GoodsDetails" */ '../views/goodsDetails/index.vue')
  },
  {
    path: '/statement',
    name: 'Statement',
    component: () => import(/* webpackChunkName: "Statement" */ '../views/statement/index.vue')
  },
  {
    path: '/site',
    name: 'Site',
    component: () => import(/* webpackChunkName: "Site" */ '../views/site/index.vue')
  },
  {
    path: '/addSite',
    name: 'AddSite',
    component: () => import(/* webpackChunkName: "Site" */ '../views/site/addSite.vue')
  },
  {
    path: '/order',
    name: 'Order',
    component: () => import(/* webpackChunkName: "Site" */ '../views/order/index.vue')
  },
  {
    path: '/orderDetails',
    name: 'OrderDetails',
    component: () => import(/* webpackChunkName: "Site" */ '../views/order/orderDetails.vue')
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
